/**
* Copyright © 2018 深圳市巨鼎医疗设备有限公司
*/
package com.zl.websocket.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.zl.websocket.entity.dto.UserLoginDto;
import com.zl.websocket.entity.dto.UserLoginSuccessDto;
import com.zl.websocket.service.UserService;

/**
 * User Controller
 * 
 * @author Zhouych
 * @date 2018年9月5日 上午10:33:44
 * @since JDK 1.8
 */
@RestController
@RequestMapping("/user")
public class UserController {

	@Autowired
	private UserService userService;

	/**
	 * 用户登录
	 * 
	 * @param loginDto
	 * @return
	 */
	@PostMapping("/login")
	public UserLoginSuccessDto login(UserLoginDto loginDto) {
		return userService.login(loginDto);
	}
}
